package ooday05;
//枚举的演示
public class EnumDemo {
    public static void main(String[] args) {
        Season s=Season.WINTER;
        System.out.println(s.getSeasonName()+"."+s.getSeasonDesc());
        switch (s){
            case SPRING:
                System.out.println("天气"+s.getSeasonDesc()+",放风筝去喽");
                break;
            case SUMMER:
                System.out.println("天气"+s.getSeasonDesc()+",游泳去喽");
                break;
            case AUTUMN:
                System.out.println("天气"+s.getSeasonDesc()+",扫落叶去咯");
                break;
            case WINTER:
                System.out.println("天气"+s.getSeasonDesc()+",堆雪人去喽");
                break;
        }






        /*
        Season[] seasons=Season.values();
        for (int i = 0; i < seasons.length ; i++) {
            System.out.print(seasons[i]+"\t");
            System.out.print(seasons[i].getSeasonName()+"\t");
            System.out.print(seasons[i].getSeasonDesc()+"\t");
            System.out.println(" ");
        }

         */




       /*
        Season s=Season.SPRING;
        System.out.println(s.getSeasonName());
        System.out.println(s.getSeasonDesc());


        Season su=Season.SUMMER;
        System.out.println(su.getSeasonName());
        System.out.println(su.getSeasonDesc());

        Season au=Season.AUTUMN;
        System.out.println(au.getSeasonName());
        System.out.println(au.getSeasonDesc());

        Season wi=Season.WINTER;
        System.out.println(wi.getSeasonName());
        System.out.println(wi.getSeasonDesc());

        */







    }
}
